<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
	<title>GSN</title>
	<link rel="stylesheet" href="style/gsn.css" type="text/css" media="screen,projection" />
	<script type="text/javascript" src="js/jquery-latest.pack.js"></script>
	<script type="text/javascript" src="js/jquery-dom.js"></script>
	<script type="text/javascript" src="js/dimensions.js"></script>
	<script type="text/javascript" src="js/jquery-tooltip.js"></script>
	<script type="text/javascript" src="js/jquery.history.js"></script>
	
		
	<script type="text/javascript" src="js/constants.js"></script>
	<script type="text/javascript" src="js/functions.js"></script>
	<script type="text/javascript" src="js/gsn.js"></script>	
	
	<!-- Include Map engine-->
	<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA2MV0HBY9S6-aGXtjN0b1ZxTNHpjHnpWHHgdGqnMBUpwQOS9hiRQYia2Wq5RjKhXafOPvhLZP4RAQOA" type="text/javascript"></script>
	<!--<script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=YahooDemo" type="text/javascript"></script>-->
	<script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3" type="text/javascript"></script>
	<script type="text/javascript" src="js/mapstraction.js"></script>
	
	<script type="text/javascript" src="js/constants.js"></script>
	
	<script type="text/javascript">
	<!--//<![CDATA[
	
		var mapProvider=null;
		$(document).ready(function() {


            $.get('menu.jsp', {selected: "fullmap"}, function(data) {
                    $('#navigation').html(data);
            });
			
			//bind buttons to javascript functionality
			$("#refreshall").bind("click",GSN.updateall);
			
			//vs height
			$("#vs").height($(window).height() - $("#vs").offset().top - 10);
			$(window).resize( function() { $("#vs").height($(window).height() - $("#vs").offset().top - 10) } );
			$("#vsmap").css("width",$(window).width()-330+"px");
			
			mapProvider = GSN.util.getURLParam("mapProvider");
			if(mapProvider.indexOf("#")!=-1){ //remove hash if any
				mapProvider = mapProvider.substring(0,mapProvider.indexOf("#"));
			}
			
			if(mapProvider==""){
				mapProvider = DEFAULT_MAP_PROVIDER;
			}
			
			if(mapProvider=="google"){
				$("#GM").attr("checked","checked");
			}
			if(mapProvider=="yahoo"){
				$("#YM").attr("checked","checked");
			}
			if(mapProvider=="microsoft"){
				$("#VE").attr("checked","checked");
				$("#toggleallmarkers").remove(); // because marker.hide() not possible with VE
			}
			
			map = new Mapstraction('vsmap',mapProvider);
			
			GSN.load();
		});	
	//]]>-->
</script>
</head>
<body style="margin:0;padding:0;width:100%;height:100%;background:#fff;overflow:hidden;" onunload="">
<div id="vsmap" style="position: relative; height: 100%; margin: 0 330px 0 0;"></div>
<div style="position: absolute; right: 0; top: 0; width: 330px; height:100%;">
	<div id="headerfm"><h1><a href="." id="gsn-name">GSN</a></h1></div>
    <div id="navigation">
	</div>
	
	<div id="main2" style="padding:0 2px;">
		<div id='selectMapProvider'>
				<input type="radio" id="VE" class="mapProvider" name="mapProvider" onclick="location.href='fullmap.html?mapProvider=microsoft';" value="VE">Virtual Earth
				<input type="radio" id="GM" class="mapProvider" name="mapProvider" onclick="location.href='fullmap.html?mapProvider=google';" value="GM">Google Maps
				<!-- <input type="radio" id="YM" class="mapProvider" name="mapProvider" onclick="location.href='fullmap.html?mapProvider=yahoo';" value="YM">Yahoo Maps -->
		</div>
		<noscript><p class="error">Your browser doesn't appear to support JavaScript. This is most likely because you're using a text-based or otherwise non-graphical browser. Sadly, GSN require javascript in order to work properly. If you want to access directly the data, you can use the api at <a href="http://localhost:22001/gsn">http://localhost:22001/gsn</a>.</p></noscript>
		<p>Auto-refresh every: 
		<select id="refreshall_timeout" >
		<option value="3600000">1hour</option> 
		<option value="600000">10min</option> 
		<option value="60000" selected="selected">1min</option> 
		<option value="30000">30sec</option> 
		<option value="5000">5sec</option> 
		<option value="1000">1sec</option> 
		<option value="0">disable</option> 
		</select>
		<input id="refreshall" type="button" value="refresh" />
		<span class="refreshing"><img src="style/ajax-loader.gif" alt="loading" title="" /></span>
		</p>
		<p><a style="text-decoration:underline" href="javascript:GSN.map.showAllMarkers();">Auto-zoom and focus the map</a></p>
		<div id="vs" style="overflow: auto;width:100%;height:50%;">
		<div class="loading">Virtual sensors are currently loading...</div>
	</div>		
</div>
</body>
</html>
